                        <? $frmtime = time(); ?>
                        <div id="contentcontainer">
                            <div class="main">
                                <h3 class="title"><?=$clabel?> &raquo; <?=$mlabel?></h3>
                                <div id="formdiv">
                                    <form method="POST" id="frmViewMenuItem<?=$frmtime?>" action="<?=base_url('admin/menu/editmenuitem')?>">
                                        <table>
                                            <? if( isset($errors) ) {
                                               foreach($errors as $error) {
                                               ?>
                                            <tr>
                                                <td class="errormsg" colspan="3">
                                                    <?=$error?>    
                                                </td>
                                            </tr>   
                                               <? 
                                               } 
                                            }  ?>
                                            <? if( isset($successes) ) {
                                               foreach($successes as $success) {
                                               ?>
                                            <tr>
                                                <td class="successmsg" colspan="3">
                                                    <?=$success?>    
                                                </td>
                                            </tr>   
                                               <? 
                                               } 
                                            }  
                                            if( isset($miid) && $miid != "") {
                                            ?>
                                            <tr>
                                                <td><label for="mglabel">Menu Group*</label></td>
                                                <td>
                                                    <div class="text"><?=$mglabel?></div>
                                                </td>
                                                <td></td>
                                            </tr>
                                            <tr>
                                                <td><label for="milabel">Menu Item*</label></td>
                                                <td>
                                                    <input type="hidden" name="miid" value="<?=$miid?>"/>
                                                    <div class="text"><?=$milabel?></div>
                                                </td>
                                                <td></td>
                                            </tr>
                                            <tr>
                                                <td><label for="milabel">Menu Item Url*</label></td>
                                                <td>
                                                    <div class="text"><?=$miurl?></div>
                                                </td>
                                                <td></td>
                                            </tr>
                                        	<tr>
                                                <td><label for="miposition">Position*</label></td>
                                                <td>
                                                    <div class="text"><?=$miposition?></div>
                                                </td>
                                                <td></td>
                                            </tr>
                                            <tr>
                                                <td><label for="miactive">Active*</label></td>
                                                <td>
                                                    <input value="1" class="required" disabled="true" type="radio" <? if($miactive=='1') echo "CHECKED=\"true\""; ?> id="miactivetrue" name="miactive"/><label for="miactivetrue">True</label>
                                                    <input value="0" class="required" disabled="true" type="radio" <? if($miactive=='0') echo "CHECKED=\"true\""; ?> id="miactivefalse" name="miactive"/><label for="miactivefalse">False</label>
                                                </td>
                                                <td></td>
                                            </tr>
                                            <tr>
                                                <td><label for="mihidden">Hidden*</label></td>
                                                <td>
                                                    <input value="1" class="required" disabled="true" type="radio" <? if($mihidden=='1') echo "CHECKED=\"true\""; ?> id="mihiddentrue" name="mihidden"/><label for="mihiddentrue">True</label>
                                                    <input value="0" class="required" disabled="true" type="radio" <? if($mihidden=='0') echo "CHECKED=\"true\""; ?> id="mihiddenfalse" name="mihidden"/><label for="mihiddenfalse">False</label>
                                                </td>
                                                <td></td>
                                            </tr>
                                            <tr>
                                                <td><label for="miroles">User Rights</label></td>
                                                <td>
                                                                                                    
                                                    <?
                                							foreach( $roles as $role  ) {
                                					?>
                                                            <input type="checkbox" disabled="true" id="mirole<?=$role['roleid']?>" <? if(in_array($role['roleid'],$miroles)) echo "CHECKED=\"true\""; ?> name="miroles[]" value="<?=$role['roleid']?>" />
                                                            <label for="mirole<?=$role['roleid']?>"><?=$role['roletitle']?></label><br />
                                                    <?           
                                                            }		 
                                                    ?>
                                                </td>
                                                <td></td>
                                            </tr>
                                            <tr>
                                        		<td></td>
                                        		<td colspan="2">
                                                    <input class="button" type="submit" name="btnEditMenuItem" value="Edit" id="btnEditMenuItem" />
                                                </td>
                                        	</tr>
                                            <?
                                            }
                                            ?>
                                        </table>
                                	</form>
                                 </div>
                                <?
                                    //print_object($midata); exit;
                                  if(isset($dgdata)) 
        						      $this->load->view('elements/datagrid',$dgdata);
        						?>   
                            </div>
                        </div>            